Array.prototype.myPush = function () {
  let args = [...arguments]
  for (let i = 0; i < args.length; i++) {
    this[this.length] = args[i]
  }
  return this.length
}
let arr = []
console.log(arr.myPush(1, 2, 3, 4));
console.log(arr);